
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />

    <!-- 满足有些用户在手机端访问的需要 -->

    <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
    <meta http-equiv="Pragma" content="no-cache" />
    <meta http-equiv="Expires" content="0" />

    <title>支付线路 - Bidcms开源电商</title>

        <link rel="stylesheet" href="<?php echo SITE_ROOT;?>statics/css/component-min.css">    <link rel="stylesheet" href="<?php echo SITE_ROOT;?>statics/plugins/jbox/jbox-min.css">



</head>
<body class="cp-bodybox">
<?php include VIEWS_PATH."global_top.php";?>
<div class="container">
    <div class="inner clearfix">
        <div class="content-left fl">
        <?php include VIEWS_PATH."global_nav.php";?>
        </div>
        <div class="content-right">
            <h1 class="content-right-title">支付线路</h1>
		 <div class="alert alert-info" style="line-height: 25px; height:30px;">支付线路搜索：<input type="text" name="" id="" class="input"/><button class="btn btn-primary">搜索</button> <a href="javascript:;" data-id="0" class="btn btn-success mgl10 j-line">添加线路</a></div>

    <table class="wxtables mgt15">
        <thead>
        <tr>
            <td>线路名称</td>
            <td>商户号</td>
            <td>支付方式</td>
            <td>支付平台</td>
             <td>更新时间</td>
            <td>状态</td>
            <td>操作</td>
        </tr>
        </thead>
        <tbody>
           <?php 
           foreach($list as $item){
           $d = array('name'=>$item['name'],'platform'=>$item['platform_id'],'gateway'=>$item['gateway'],'mid'=>$item['merchant_id'],'mkey'=>$item['merchant_key'],'paycode'=>$item['pay_type'],'data'=>$item['data']);
           ?>
           <tr>
                <td><?php echo $item['name'];?></td>
                <td><?php echo $item['merchant_id'];?></td>
                <td><?php echo $item['pay_type'];?></td>
                <td><?php echo $platforms[$item['platform_id']]['name'];?></td>
                <td><?php echo date('Y-m-d H:i:s',$item['updatetime']);?></td>
                <td><span class="label label-<?php echo $item['state']==1?'success':'danger';?> j-state" data-id="<?php echo $item['id'];?>"><?php echo $item['state']==1?'开启':'关闭';?></span></td>
                <td><button class="btn j-line" type="button" data-id="<?php echo $item['id'];?>">修改</button><textarea style="display:none;" id="data<?php echo $item['id'];?>"><?php echo json_encode($d);?></textarea></td>
            </tr> 
            <?php }?>
        </tbody>
    </table>

    <div class="tables-btmctrl clearfix">
        <div class="fr">
            <div class="paginate">
              <?php echo $pageinfo;?>
            </div>
            <!-- end paginate -->
        </div>
    </div>
    <!-- end tables-btmctrl -->

        </div>
        <!-- end content-right -->

        <a href="javascript:;" class="btn-leftMenuFold" id="j-btn-leftMenuFold" ></a>
    </div>
</div>
<!-- end container -->


<?php include VIEWS_PATH."global_footer.php";?>
<script type="text/j-template" id="tpl_line">
        <div class="formitems">
            <label class="fi-name">线路名称：</label>
            <div class="form-controls pdt5"><input type="text" id="name" value="<%= name %>" class="input cinput"/></div>
        </div>
        <div class="formitems">
            <label class="fi-name">支付平台：</label>
            <div class="form-controls pdt5"><select class="select cinput" id="platform"><%if(platform!=0){%><option value="<%= platform %>">不改动</option><% }%><?php foreach($platforms as $k=>$v){?><option value="<?php echo $k;?>"><?php echo $v['name'];?></option><?php }?></select></div>
        </div>
        <div class="formitems">
            <label class="fi-name">网关地址：</label>
            <div class="form-controls pdt5"><input type="text" id="url" value="<%= gateway %>" class="input cinput"/></div>
        </div>
        <div class="formitems">
            <label class="fi-name">商户号：</label>
            <div class="form-controls pdt5"><input type="text" id="mid" value="<%= mid %>" class="input cinput"/></div>
        </div>
        <div class="formitems">
            <label class="fi-name">商户密钥：</label>
            <div class="form-controls pdt5"><input type="text" id="mkey" value="<%= mkey %>" class="input cinput"/></div>
        </div>
        <div class="formitems">
            <label class="fi-name">支付方式：</label>
            <div class="form-controls pdt5"><input type="text" id="paycode" value="<%= paycode %>" class="input cinput"/> <span class="fi-help-text">由第三方商户提供</span></div>
        </div>
        <div class="formitems">
            <label class="fi-name">扩展参数：</label>
            <div class="form-controls pdt3"><textarea id="ext" class="textarea cinput"><%= data %></textarea><span class="fi-help-text">每行一个或以英文分号隔开，键和值用英文冒号隔开如：payname:alipay</span></div>
        </div>
</script>
<script src="<?php echo SITE_ROOT;?>statics/js/dist/System/payment.js"></script>

</body>
</html>
<!-- 20170105 -->
